<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui">
      
    <ui:composition template="/new-template/template.xhtml">
    	
    	<ui:define name="tituloPagina">
    		<h:outputText value="Alterar Senha :: Controle de Acesso :: SEDUC" />
    	</ui:define>
		
		<ui:define name="body">
		
			<h:form id="alterarSenhaForm">
    		     <h:panelGroup id="alterarSenhaGroup" rendered="#{usuarioBean.searching}">		
				    <fieldset>
				       <legend> Alterar Senha </legend>
				       
				       <h:panelGrid columns="2" columnClasses="colunaBusca">
				       	
							<h:outputLabel value="Senha atual: *"/>
							<h:inputSecret required="true" 
										   value="#{usuarioBean.senhaAtual}" 
										   size="20" 
										   converter="converterStringVazia" 
										   label="Senha atual"/>
										   
							<h:outputLabel value="Nova senha: *"/>
						    <h:inputSecret required="true"
										   value="#{usuarioBean.novaSenha}" 
										   size="20"
										   label="Nova senha">
									<f:converter converterId="converterStringVazia"/>
							</h:inputSecret>
			
							<h:outputLabel value="Repita a nova senha: *" />
							<h:inputSecret value="#{usuarioBean.novaSenhaRepita}" size="20" 
										   required="true" label="Repita a nova senha">
							   <f:converter converterId="converterStringVazia"/>
							</h:inputSecret>
				       </h:panelGrid>
				       
				       <div class="margemtop">
				       		<p:commandButton styleClass="btIcon" 
						 					 value="Alterar"
											 image="updateIcon"
											 actionListener="#{usuarioBean.alteraSenha}"
											 update=":painelGlobal" 
											 onclick="carregando.show()">
							</p:commandButton>
				       </div>
				   </fieldset>
				</h:panelGroup>
			</h:form>
		</ui:define>		  
    </ui:composition>
</html>